package com.xiaoh.dormitoryrepairreportbackend.model.dto.workorder;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 工单响应DTO
 * 包含连表查询的详细信息
 */
@Data
@Schema(description = "工单响应信息")
public class WorkOrderResponse implements Serializable {

    /**
     * 工单ID
     */
    @Schema(description = "工单ID")
    private Long id;

    /**
     * 工单编号(业务ID)
     */
    @Schema(description = "工单编号(业务ID)")
    private String workOrderId;

    /**
     * 报修人ID
     */
    @Schema(description = "报修人ID")
    private Long reporterId;

    /**
     * 报修人账号
     */
    @Schema(description = "报修人账号")
    private String reporterAccount;

    /**
     * 报修人昵称
     */
    @Schema(description = "报修人昵称")
    private String reporterNickName;

    /**
     * 报修人电话
     */
    @Schema(description = "报修人电话")
    private String reporterPhoneNumber;

    /**
     * 处理人ID
     */
    @Schema(description = "处理人ID")
    private Long handlerId;

    /**
     * 处理人账号
     */
    @Schema(description = "处理人账号")
    private String handlerAccount;

    /**
     * 处理人昵称
     */
    @Schema(description = "处理人昵称")
    private String handlerNickName;

    /**
     * 处理人电话
     */
    @Schema(description = "处理人电话")
    private String handlerPhoneNumber;

    /**
     * 报修类别ID
     */
    @Schema(description = "报修类别ID")
    private Integer categoryId;

    /**
     * 报修类别名称
     */
    @Schema(description = "报修类别名称")
    private String categoryName;

    /**
     * 工单标题
     */
    @Schema(description = "工单标题")
    private String title;

    /**
     * 问题描述
     */
    @Schema(description = "问题描述")
    private String description;

    /**
     * 报修地址
     */
    @Schema(description = "报修地址")
    private String location;

    /**
     * 图片凭证(URL数组)
     */
    @Schema(description = "图片凭证(URL数组)")
    private String imagesUrl;

    /**
     * 工单状态(1:待处理, 2:处理中, 3:已完成, 4:已评价, 0:已取消)
     */
    @Schema(description = "工单状态(1:待处理, 2:处理中, 3:已完成, 4:已评价, 0:已取消)")
    private Integer status;

    /**
     * 服务评分(1-5星)
     */
    @Schema(description = "服务评分(1-5星)")
    private Integer rating;

    /**
     * 服务评价
     */
    @Schema(description = "服务评价")
    private String reviewComment;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;

    private static final long serialVersionUID = 1L;
}
